import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import HelloWorld from '../components/HelloWorld.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: { requiresAuth: true }
  },
  // {
  //   path: '/about/:id',
  //   name: 'About',
  //   component: () => import('../views/About.vue'),
  //   // beforeEnter: (to, from, next) => {
  //   //   console.log(to)
  //   //   console.log(from),
  //   //   next()
  //   // },
  //   children: [{
  //     path: 'hello',
  //     name: 'Hello',
  //     component: () => import('../components/HelloWorld.vue'),
  //   }]
  // },
  
]


const router = new VueRouter({
  routes
})

export default router
